    //closing the dialog box  
    $("#invitation_form").dialog("close");  
      
    //making sure we don't display the flash notice more than once  
    $("#flash_notice").remove();  
      
    //showing a flash message  
    $("#container").prepend("<div id="flash_notice">Successfully shared the folder</div>");  

	//Removing the css class 'folder'  
$("#folder_<%= params[:folder_id] %>").removeClass("folder");  
  
//Adding the css class 'shared_folder'  
$("#folder_<%= params[:folder_id] %>").addClass("shared_folder"); 